Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use access token to authenticate with the Google Cloud. #83

Merged
merged 3 commits into from
Jul 27, 2023
Merged

Conversation

spetrovic77
Copy link
Contributor

When using GitHub actions or other CI/CD platform, the user may not be able to run gcloud init interactively. The recommended login for those kinds of deployments is to get an access token from Google Cloud, store it as a secret and use it for deployments. This change adds support for using such tokens for deployment, either by passing an "access_token" flag to the weaver-gke commands, or by setting the CLOUDSDK_AUTH_ACCESS_TOKEN variable when invoking the commands.

Other changes:

  • Unify flag handling for the cloud flags across all commands.
  • Remove project and account fields from the GKEConfig proto.
  • Minor cleanups.

@spetrovic77 spetrovic77 self-assigned this Jul 25, 2023
When using GitHub actions or other CI/CD platform, the user may
not be able to run `gcloud init` interactively. The recommended
login for those kinds of deployments is to get an access token
from Google Cloud, store it as a secret and use it for deployments.
This change adds support for using such tokens for deployment, either
by passing an "access_token" flag to the `weaver-gke` commands, or
by setting the CLOUDSDK_AUTH_ACCESS_TOKEN variable when invoking
the commands.

Other changes:
  * Unify flag handling for the cloud flags across all commands.
  * Remove project and account fields from the `GKEConfig` proto.
  * Minor cleanups.
Copy link
Member

@mwhittaker mwhittaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!!! 🪙

cmd/weaver-gke/flags.go Show resolved Hide resolved
@spetrovic77 spetrovic77 merged commit 14feb5f into main Jul 27, 2023
7 checks passed
@spetrovic77 spetrovic77 deleted the account branch July 27, 2023 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants